#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.server.${name}.dao;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * BaseDao
 * Created by Daniel on 2017/4/18.
 */
public interface IBaseDao<T> {
    T findById(Serializable id) throws SQLException;

    T findByParams(Map<String, Object> params) throws SQLException;

    List<T> findAll() throws SQLException;

    List<T> findAll(Map<String, Object> params) throws SQLException;

    Long count(Map<String, Object> params) throws SQLException;

    Integer save(T o) throws SQLException;

    Integer saveList(List<T> list) throws SQLException;

    Integer update(T o) throws SQLException;

    Integer delete(Serializable id) throws SQLException;

    Integer delete(T o) throws SQLException;

    Integer deleteList(List<T> list) throws SQLException;
}